package com.ruoyi.gcgl.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gcgl.mapper.GysptWarehousePickingMapper;
import com.ruoyi.gcgl.domain.GysptWarehousePicking;
import com.ruoyi.gcgl.service.IGysptWarehousePickingService;
import com.ruoyi.common.core.text.Convert;

/**
 * 领料单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-01
 */
@Service
public class GysptWarehousePickingServiceImpl implements IGysptWarehousePickingService 
{
    @Autowired
    private GysptWarehousePickingMapper gysptWarehousePickingMapper;

    /**
     * 查询领料单
     * 
     * @param id 领料单主键
     * @return 领料单
     */
    @Override
    public GysptWarehousePicking selectGysptWarehousePickingById(Long id)
    {
        return gysptWarehousePickingMapper.selectGysptWarehousePickingById(id);
    }

    /**
     * 查询领料单列表
     * 
     * @param gysptWarehousePicking 领料单
     * @return 领料单
     */
    @Override
    public List<GysptWarehousePicking> selectGysptWarehousePickingList(GysptWarehousePicking gysptWarehousePicking)
    {
        return gysptWarehousePickingMapper.selectGysptWarehousePickingList(gysptWarehousePicking);
    }

    /**
     * 新增领料单
     * 
     * @param gysptWarehousePicking 领料单
     * @return 结果
     */
    @Override
    public int insertGysptWarehousePicking(GysptWarehousePicking gysptWarehousePicking)
    {
        return gysptWarehousePickingMapper.insertGysptWarehousePicking(gysptWarehousePicking);
    }

    /**
     * 修改领料单
     * 
     * @param gysptWarehousePicking 领料单
     * @return 结果
     */
    @Override
    public int updateGysptWarehousePicking(GysptWarehousePicking gysptWarehousePicking)
    {
        return gysptWarehousePickingMapper.updateGysptWarehousePicking(gysptWarehousePicking);
    }

    /**
     * 批量删除领料单
     * 
     * @param ids 需要删除的领料单主键
     * @return 结果
     */
    @Override
    public int deleteGysptWarehousePickingByIds(String ids)
    {
        return gysptWarehousePickingMapper.deleteGysptWarehousePickingByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除领料单信息
     * 
     * @param id 领料单主键
     * @return 结果
     */
    @Override
    public int deleteGysptWarehousePickingById(Long id)
    {
        return gysptWarehousePickingMapper.deleteGysptWarehousePickingById(id);
    }
}
